package cn.seaboot.admin.mvc.cors;

import org.springframework.web.cors.CorsConfiguration;

import java.io.Serializable;

/**
 * 对比于{@link CorsConfiguration}，实际上，就是增加了 ant-path 这一字段。
 *
 * @author Mr.css
 * @version 2022-07-14 15:23
 * @see CorsConfiguration
 */
public class CorsAntConfig implements Serializable {
    private static final long serialVersionUID = -6675096351648785772L;

    /**
     * 项目内的路径
     */
    private String antPath;
    /**
     * 跨域配置
     */
    private CorsConfiguration configuration;

    public CorsAntConfig(String antPath, CorsConfiguration configuration) {
        this.antPath = antPath;
        this.configuration = configuration;
    }

    public String getAntPath() {
        return antPath;
    }

    public void setAntPath(String antPath) {
        this.antPath = antPath;
    }

    public CorsConfiguration getConfiguration() {
        return configuration;
    }

    public void setConfiguration(CorsConfiguration configuration) {
        this.configuration = configuration;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @Override
    public String toString() {
        return "CrossAntConfig{" +
                "antPath='" + antPath + '\'' +
                ", configuration=" + configuration +
                '}';
    }
}
